<?php
if (!defined('INDEX')) {
	exit ('Access Denied');
}
$goods_type=$duoduo->select_all("type","id,title","tag='goods'".$where_type." order by sort=0 asc,sort asc,id desc");$goods_count = count($goods_type);
	foreach($goods_type as $k=>$vo){
		$canshu=array();
		if($bankuai_code){
			$canshu['code']=$bankuai_code;
		}
		$canshu['cid']=$vo['id'];
		if($_GET['do']){
			$canshu['do']=$_GET['do'];
		}
		$goods_type[$k]['url']=u('goods','index',$canshu);
	}	
?><style>	.category-img img{		display:inline-block;		width:50px;		height:40px;		position:relative;		left:100px;		top:-142px;		margin-left:5px;		text-align:middler;			}	.banner_l li {		width:49% !important;		position:relative;		border-right:1px solid #ccc;	}	.banner_l li a {		text-align:left !important;		text-indent:30px;	}	.banner_l li:nth-child(even) {		border:none !important;	}</style><?php	$ad_start = 200;	$ad_start2 = 300;	if (isset($_GET['ppp'])) {?>	<style>		.app-other {			position:relative;		}		.banner_l li {			width:100% !important;			text-align:left;			background:none !important;			overflow:inherit !important;		}		.banner_l li a {			text-align:left !important;			width:15%;			border-right:1px solid #ccc;			border-bottom:1px solid #ccc;			padding:5px 10px;		}		.ad-wrap {			display:none;		}		.show-wrap {			display:none;			position:absolute;			width:70%;			left:48%;			top:20px;			margin-left:-25%;			text-align:center;		}		.show-wrap p {			font-size:16px;			font-weight:bold;			position:relative;			top:-20px;		}		.show-wrap a {			font-size:16px;			position:relative;			top:40px;			font-weight:bold;			padding:5px 10px;			border:1px solid #ccc;					}		.show-wrap a:hover {			color:orange;		}		.active a{			border-right:3px solid orange !important;		}	</style><?php } ?><?php include(TPLPATH.'/inc/header.tpl.php');?>
		<div class="app-other">		<?php if (isset($_GET['ppp'])) { ?>			<div class="show-wrap">				<p>为您推荐</p>				<img>				<a>查看分类产品</a>			</div>		<?php } ?>
	 <ul>
	<div class="index_w2">
	</div>
	 <div class="banner_l">
		
		   <?php foreach($goods_type as $vo){ ?>				<?php if (isset($_GET['ppp'])) { ?>				
					<li>						<a href="javascript:;" data-id="<?=$vo['id']?>" <?php if($_GET['cid']==$vo['id']){?>class="jx"<?php } else {?>class="type-item"<?php } ?> data-href="<?=wap_l('goods','index',array('code'=>$_GET['code'],'cid'=>$vo['id']))?>"><?=$vo['title']?></a>						<div id="my-<?=$vo['id']?>" class="ad-wrap">							<?=AD($ad_start)?>						</div>					</li> 				<?php $ad_start+=1;} else {?>						<li><a href="<?=wap_l('goods','index',array('code'=>$_GET['code'],'cid'=>$vo['id']))?>" <?php if($_GET['cid']==$vo['id']){?>class="jx"<?php }?>><?=$vo['title']?><div class="category-img"><?=AD($ad_start2)?></div></a>					</li> <?php $ad_start2+=1;} ?>		<?php } ?>
			</div>       
	 </ul> <div class="clear"></div>
		<p style="margin-top:30px"><a href="<?=wap_l('user','index')?>"><em  class="icon-user"></em><br>个人中心</a><a href="<?=wap_l('user','invite')?>"><em class="icon-about"></em><br>邀请好友</a></p> 
	</div>	<?php if (isset($_GET['ppp'])) { ?>	<script>		var width = $(document).width(),			height = $(document).height();		$(function() {			var that2 = $($('.type-item')[0]);			that2.parent().addClass('active');			//console.log(that2);			var id = that2.attr('data-id');			var href = that2.attr('data-href');			var id_str = '#my-' + id;			var content_wrap = $(id_str);			var show_wrap = $('.show-wrap');			var img_width = content_wrap.find('img').attr('width');			var img_height = content_wrap.find('img').attr('height');			show_wrap.find('a').attr('href', href);			show_wrap.find('img').attr('src', content_wrap.find('img').attr('src'));			show_wrap.find('img').attr('alt', content_wrap.find('img').attr('alt'));			show_wrap.find('img').attr('width', '100%');			show_wrap.find('img').attr('height', '175px');			show_wrap.show();		})		$('.type-item').click(function(e) {			var that = $(this);			that.parent().siblings().removeClass('active');			that.parent().addClass('active');			var id = that.attr('data-id');			var href = that.attr('data-href');			//console.log(id);			var id_str = '#my-' + id;			var content_wrap = $(id_str);			var show_wrap = $('.show-wrap');			var img_width = content_wrap.find('img').attr('width');			var img_height = content_wrap.find('img').attr('height');			show_wrap.find('a').attr('href', href);			show_wrap.find('img').attr('src', content_wrap.find('img').attr('src'));			show_wrap.find('img').attr('alt', content_wrap.find('img').attr('alt'));			show_wrap.find('img').attr('width', '100%');			show_wrap.find('img').attr('height', '175px');			show_wrap.show();								})	</script>	<?php } ?>